package ex.com.jm.food.service.impl;

import java.util.List;

import ex.com.jm.food.dao.UserCartDao;
import ex.com.jm.food.entity.Company;
import ex.com.jm.food.entity.FoodCart;
import ex.com.jm.food.entity.Menu;
import ex.com.jm.food.entity.Streets;
import ex.com.jm.food.service.UserCartService;

public class UserCartServiceImpl implements UserCartService {

	private UserCartDao userCartDao;
	public UserCartDao getUserCartDao() {
		return userCartDao;
	}

	public void setUserCartDao(UserCartDao userCartDao) {
		this.userCartDao = userCartDao;
	}

	@Override
	public List<FoodCart> getCarts(String userId) {
		// TODO Auto-generated method stub
		return this.getUserCartDao().getCarts(userId);
	}

	@Override
	public Object saveCart(FoodCart foodCart) {
		// TODO Auto-generated method stub
		return this.getUserCartDao().saveCart(foodCart);
	}

	@Override
	public void delCart(String cartId) {
		// TODO Auto-generated method stub
      this.getUserCartDao().delCart(cartId);
	}

	@Override
	public boolean updateCart(String cartId, int num) {
		// TODO Auto-generated method stub
		return this.getUserCartDao().updateCart(cartId, num);
	}

	@Override
	public Menu getMenu(String menuId) {
		// TODO Auto-generated method stub
		return this.getUserCartDao().getMenu(menuId);
	}

	@Override
	public FoodCart checkFoodCart(String menuId, String userId) {
		// TODO Auto-generated method stub
		return this.getUserCartDao().checkFoodCart(menuId, userId);
	}

	@Override
	public Company getCompany(String comId) {
		// TODO Auto-generated method stub
		return this.getUserCartDao().getCompany(comId);
	}

	@Override
	public List<Streets> getStreets() {
		// TODO Auto-generated method stub
		return this.getUserCartDao().getStreets();
	}

}
